/**
 * Created by Administrator on 2017/3/9 0009.
 */
import Relay from "react-relay";

export default class SendCodeMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { sendCode }`;
    }

    getVariables() {
        return {
            argsInput: {
                phone: this.props.phone
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on sendCodePayload {
            sendCode {
                errorCode
                code
                value
                token
                timeNow
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on sendCodePayload {
                    sendCode {
                        errorCode
                        code
                        value
                        token
                        timeNow
                    }
                }
            `]
        }];
    }

}